<template>
  <div class="oweOrderHandling">
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <span style="line-height: 36px;">欠货订单处理</span>
      </div>
      <s-table
        :table="table"
        @http="tableWatch">
        <el-table-column
          fixed="right"
          align="center"
          slot="operation"
          class-name="operationMore"
          label="可用操作"
          width="280">
          <template slot-scope="s">
            <el-button type="warning" style="margin: 5px" size="mini" @click="tableAdditionalAllot(s.row)" v-if="s.row.zxzt ==0 && s.row.jhzt==0">追加分配</el-button>
            <el-button type="warning"  style="margin: 5px" size="mini" @click="dialogAllotDetailedOpen(s.row)">查看分配明细</el-button>
            <el-button type="warning" style="margin: 5px" size="mini" @click="dialogPackingDetailedOpen(s.row)">查看装箱明细</el-button>
            <el-button type="warning" style="margin: 5px" size="mini" @click="dialogSplitSingleDetailedOpen(s.row)">查看拆单明细</el-button>
          </template>
        </el-table-column>
        <el-row>
          <el-col :xs="24" :lg="{span: 8, offset: 0}">
            <el-form-item label="自定列名">
              <el-select
                class="__tabel_column"
                name="testSelet1"
                value-key="prop"
                multiple-limit.number="4"
                v-model="table.tableColumn" multiple placeholder="请选择">
                <el-option
                  v-for="item in table.tableColumnAll"
                  :key="item.prop"
                  :label="item.label"
                  :value="item">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="订单号" prop="khddh">
              <el-input type="text"
                        class="input"
                        v-model="autoVue_table_khddh"
                        placeholder="客户订单号" spellcheck="false" auto-capitalize="off" auto-complete="off"
                        auto-correct="off"></el-input>
            </el-form-item>
            <el-form-item label="路线名称" prop="xl">
              <el-input type="text"
                        class="input"
                        v-model="autoVue_table_xl"
                        placeholder="路线" spellcheck="false" auto-capitalize="off" auto-complete="off"
                        auto-correct="off"></el-input>
            </el-form-item>
            <el-form-item label="联系人员" prop="lxrxm">
              <el-input type="text"
                        class="input"
                        v-model="autoVue_table_lxrxm"
                        placeholder="联系人" spellcheck="false" auto-capitalize="off" auto-complete="off"
                        auto-correct="off"></el-input>
            </el-form-item>
            <el-form-item label="SO编号" prop="fybh">
              <el-input type="text"
                        class="input"
                        v-model="autoVue_table_fybh"
                        placeholder="SO编号" spellcheck="false" auto-capitalize="off" auto-complete="off"
                        auto-correct="off"></el-input>
            </el-form-item>
            <el-form-item label="客户地址" prop="khdz">
              <el-input type="text"
                        class="input"
                        v-model="autoVue_table_khdz"
                        placeholder="客户地址" spellcheck="false" auto-capitalize="off" auto-complete="off"
                        auto-correct="off"></el-input>
            </el-form-item>
            <!--
            <el-form-item label="订单类型" prop="fylx">
              <el-select v-model="autoVue_table_fylx"
                         filterable
                         remote
                         placeholder="请选择订单类型">
                <el-option
                  v-for="item in dialog.wmsPurchaseOrder"
                  :key="item.id"
                  :label="item.ddlx"
                  :value="item.id">
                </el-option>
              </el-select>
            </el-form-item>
            -->
            <el-form-item label="客户编号" prop="khbh">
              <el-input type="text"
                        class="input"
                        v-model="autoVue_table_khbh"
                        placeholder="客户编号" spellcheck="false" auto-capitalize="off" auto-complete="off"
                        auto-correct="off"></el-input>
            </el-form-item>
            <el-form-item label="客户名称" prop="khmc">
              <el-input type="text"
                        class="input"
                        v-model="autoVue_table_khmc"
                        placeholder="客户名称" spellcheck="false" auto-capitalize="off" auto-complete="off"
                        auto-correct="off"></el-input>
            </el-form-item>
            <el-form-item label="波次编号" prop="bcbh">
              <el-input type="text"
                        class="input"
                        v-model="autoVue_table_bcbh"
                        placeholder="波次编号" spellcheck="false" auto-capitalize="off" auto-complete="off"
                        auto-correct="off"></el-input>
            </el-form-item>
            <el-form-item label="货品编号" prop="bh">
              <el-input type="text"
                        class="input"
                        v-model="autoVue_table_bh"
                        placeholder="货品编号" spellcheck="false" auto-capitalize="off" auto-complete="off"
                        auto-correct="off"></el-input>
            </el-form-item>
            <el-form-item label="货品名称" prop="hpmc">
              <el-input type="text"
                        class="input"
                        v-model="autoVue_table_hpmc"
                        placeholder="货品名称" spellcheck="false" auto-capitalize="off" auto-complete="off"
                        auto-correct="off"></el-input>
            </el-form-item>
            <el-form-item label="可用操作" prop="kycz">
              <div class="s-content">
                <el-button @click="tableSetSearch('table')" size="small">重置搜索</el-button>
              </div>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :lg="{span: 8, offset: 0}">
            <el-form-item label="创建时间" prop="khcjsj">
              <el-date-picker
                v-model="autoVue_table_khcjsj"
                type="daterange"
                placeholder="客户创建时间">
              </el-date-picker>
            </el-form-item>
            <el-form-item label="创建时间" prop="cjsj">
              <el-date-picker
                v-model="autoVue_table_cjsj"
                type="daterange"
                placeholder="WMS创建时间">
              </el-date-picker>
            </el-form-item>
            <el-form-item label="优先级" prop="yxj">
              <el-select v-model="autoVue_table_yxj"
                         placeholder="优先级">
                <el-option
                  label="全部"
                  value=""></el-option>
                <el-option
                  v-for="item in SHIPMENT.yxj"
                  :key="item.dictionaryid"
                  :label="item.value"
                  :value="item.dictionaryid">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="SO状态" prop="fyzt">
              <el-select v-model="autoVue_table_fyzt"
                         placeholder="SO状态">
                <el-option
                  label="全部"
                  value=""></el-option>
                <el-option
                  v-for="item in SHIPMENT.fyzt"
                  :key="item.dictionaryid"
                  :label="item.value"
                  :value="item.dictionaryid">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="发货时间" prop="jhfhsj">
              <el-date-picker
                v-model="autoVue_table_jhfhsj"
                type="daterange"
                placeholder="计划发货时间">
              </el-date-picker>
            </el-form-item>
            <el-form-item label="交货时间" prop="yqjhsj">
              <el-date-picker
                v-model="autoVue_table_yqjhsj"
                type="daterange"
                placeholder="要求交货时间">
              </el-date-picker>
            </el-form-item>
            <el-form-item label="审核状态" prop="shzt">
              <el-select v-model="autoVue_table_shzt"
                         placeholder="是否审核">
                <el-option
                  label="全部"
                  value=""></el-option>
                <el-option
                  label="未审核"
                  value="0"></el-option>
                <el-option
                  label="已审核"
                  value="1"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="拣货状态" prop="jhzt">
              <el-select v-model="autoVue_table_jhzt"
                         placeholder="拣货状态">
                <el-option
                  label="全部"
                  value=""></el-option>
                <el-option
                  v-for="item in SHIPMENT.jhzt"
                  :key="item.dictionaryid"
                  :label="item.value"
                  :value="item.dictionaryid">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="波次状态" prop="bczt">
              <el-select v-model="autoVue_table_bczt"
                         placeholder="是否加入">
                <el-option
                  label="全部"
                  value=""></el-option>
                <el-option
                  label="未加入"
                  value="0"></el-option>
                <el-option
                  label="已加入"
                  value="1"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="拆单状态" prop="cdzt">
              <el-select v-model="autoVue_table_cdzt"
                         placeholder="是否拆弹">
                <el-option
                  label="全部"
                  value=""></el-option>
                <el-option
                  label="未拆单"
                  value="0"></el-option>
                <el-option
                  label="已拆单"
                  value="1"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="装箱状态" prop="zxzt">
              <el-select v-model="autoVue_table_zxzt"
                         placeholder="是否装箱">
                <el-option
                  label="全部"
                  value=""></el-option>
                <el-option
                  label="未装箱"
                  value="0"></el-option>
                <el-option
                  label="已装箱"
                  value="1"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="交货方式" prop="jhfs">
              <el-select v-model="autoVue_table_jhfs"
                         placeholder="交货方式">
                <el-option
                  label="全部"
                  value=""></el-option>
                <el-option
                  label="发运"
                  value="0"></el-option>
                <el-option
                  label="自提"
                  value="1"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :xs="24" :lg="{span: 8, offset: 0}">
            <el-form-item label="启用多选" prop="multiSelect">
              <el-switch
                v-model="table.multiSelect"
                on-color="#13ce66"
                off-color="#ff4949">
              </el-switch>
              <el-button @click="clearMuti('table')" type="danger" size="small" style="margin-left: 25px" v-if="table.multiSelect">清空选择</el-button>
            </el-form-item>
            <transition name="el-zoom-in-top">
              <el-form-item label="多选操作" prop="multiSelect" v-if="table.multiSelect">
                <el-row>
                  <el-col :span="8">
                    <el-button size="small" type="info" @click="tableAdditionalAllot('')">追加分配</el-button>
                  </el-col>
                  <el-col :span="8">
                    <el-button size="small" type="info" @click="tableAdditionalPicking('')">追加拣货</el-button>
                  </el-col>
                  <el-col :span="8">
                    <el-button size="small" type="info" @click="tableAdditionalPacking('')">追加装箱</el-button>
                  </el-col>
                  <el-col :span="8">
                    <el-button size="small" type="info" @click="tableAdditionalShipment('')">追加发运</el-button>
                  </el-col>
                </el-row>
              </el-form-item>
            </transition>
          </el-col>
        </el-row>
      </s-table>
    </el-card>
    <s-dialog :dialog="dialogAllotDetailed" :close="dialogAllotDetailedInit" @http="tableWatch">
      <p slot="title">{{dialogAllotDetailed.title}}发运订单行 <span>{{dialogAllotDetailed.row.fybh}}</span></p>
      <s-table :table="tableAllotDetailed" ref="tableAllotDetailed" @http="tableWatch" :expand="false">
        <el-table-column
          fixed="right"
          align="center"
          slot="operation"
          class-name="operationMore"
          label="可用操作"
          width="120">
          <template slot-scope="s">
            <el-button type="info" size="mini" @click="dialogAllotDetailedMxOpen(s.row)">选择</el-button>
          </template>
        </el-table-column>
      </s-table>
    </s-dialog>
    <s-dialog :dialog="dialogAllotDetailedMx" :close="dialogAllotDetailedMxInit">
      <s-table :table="tableAllotDetailedMx" ref="tableAllotDetailedMx" @http="tableWatch">
      </s-table>
    </s-dialog>
    <s-dialog :dialog="dialogSplitSingleDetailed">
      <p slot="title">{{dialogSplitSingleDetailed.title}}发运订单行</p>
      <s-table :table="tableSplitSingleDetailed" ref="tableSplitSingleDetailed" :expand="false"  :index="true">
        <el-table-column
          fixed="right"
          align="center"
          slot="operation"
          class-name="operationMore"
          label="可用操作"
          width="125">
          <template slot-scope="s">
            <el-button type="info" size="mini" @click="dialogSplitSingleDetailedMxOpen(s.row)">点击</el-button>
          </template>
        </el-table-column>
      </s-table>
    </s-dialog>
    <s-dialog :dialog="dialogSplitSingleDetailedMx">
      <p slot="title">{{dialogSplitSingleDetailedMx.title}}折单行</p>
      <s-table :table="tableSplitSingleDetailedMx" ref="tableSplitSingleDetailedMx" :expand="false" :index="true">
      </s-table>
    </s-dialog>
  </div>
</template>

<script>
  import {AutoVue} from '~/plugins/Tools';
  export default AutoVue({
    name: 'base_oweOrderHandling-FEcarWms',
    head: {
      'title': '欠货订单处理',
      'meta': [
        { 'hid': 'description', 'name': 'description', 'content': '乐速科技平台 欠货订单处理 查看欠货订单处理信息' },
      ],
    },
    store: ['DICTIONARY_shipment', 'SHIPMENT', 'USER'],
    data: {
      table: {
        column: [
          { label: 'wms创建时间',
            prop: 'cjsj',
            minWidth: '0px',
            cRemarks: '',
            formatter: (row, column) => {
              return this.a.methods.formatterTime(row[column.property || column], 6);
            },
            type: 'DateRange',
            search: true },
          { label: '客户创建时间',
            prop: 'khcjsj',
            minWidth: '0px',
            cRemarks: '',
            formatter: (row, column) => {
              return this.a.methods.formatterTime(row[column.property || column], 6);
            },
            type: 'DateRange',
            search: true },
          { label: 'SO编号',
            prop: 'fybh',
            minWidth: '0px',
            cRemarks: '',
            search: true },
          { label: '客户订单号',
            prop: 'khddh',
            minWidth: '0px',
            cRemarks: '',
            search: true },
          { label: 'SO类型',
            prop: 'show_fylx',
            minWidth: '0px',
            cRemarks: '',
            search: true },
          { label: '交货方式',
            prop: 'show_jhfs',
            minWidth: '0px',
            cRemarks: '0、发运 1、自提',
            search: true },
          { label: '客户编号',
            prop: 'khbh',
            minWidth: '0px',
            cRemarks: '',
            search: true },
          { label: '客户名称',
            prop: 'khmc',
            minWidth: '0px',
            cRemarks: '',
            search: true },
          { label: '联系人',
            prop: 'lxrxm',
            minWidth: '0px',
            cRemarks: '',
            search: true },
          { label: '路线',
            prop: 'xl',
            minWidth: '0px',
            cRemarks: '',
            search: true },
          { label: '波次编号',
            prop: 'bcbh',
            minWidth: '0px',
            cRemarks: '',
            search: true },
          { label: '货品编号',
            prop: 'bh',
            minWidth: '0px',
            cRemarks: '',
            search: true },
          { label: '货品名称',
            prop: 'hpmc',
            minWidth: '0px',
            cRemarks: '',
            search: true },
          { label: '优先级',
            prop: 'yxj',
            minWidth: '0px',
            cRemarks: '',
            search: true },
          { label: '客户地址',
            prop: 'khdz',
            minWidth: '0px',
            cRemarks: '',
            search: true },
          { label: '审核状态',
            prop: 'show_shzt',
            minWidth: '0px',
            cRemarks: '0、未审核 1、已审核',
            search: true },
          { label: '拆单状态',
            prop: 'show_cdzt',
            minWidth: '0px',
            cRemarks: '0、未拆单 1、已拆单',
            search: true },
          { label: '装箱状态',
            prop: 'show_zxzt',
            minWidth: '0px',
            cRemarks: '0、未装箱 1、部分装箱 2、全部装箱',
            search: true },
          { label: '波次状态',
            prop: 'show_bczt',
            minWidth: '0px',
            cRemarks: '0、未加入 1、已加入',
            search: true },
          { label: '拣货状态',
            prop: 'show_jhzt',
            minWidth: '0px',
            cRemarks: '0、初始 1、部分拣货 2、全部拣货',
            search: true },
          { label: 'SO状态',
            prop: 'show_fyzt',
            minWidth: '0px',
            cRemarks: '0、初始 1、部分分配2、全部分配 3、部分发运4、全部发运5、订单取消6、订单完成',
            search: true },
          { label: '备注',
            prop: 'bz',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '计划发货时间',
            prop: 'jhfhsj',
            minWidth: '0px',
            cRemarks: '',
            formatter: (row, column) => {
              return this.a.methods.formatterTime(row[column.property || column], 6);
            },
            type: 'DateRange',
            search: true },
          { label: '要求交货时间',
            prop: 'yqjhsj',
            minWidth: '0px',
            cRemarks: '',
            formatter: (row, column) => {
              return this.a.methods.formatterTime(row[column.property || column], 6);
            },
            type: 'DateRange',
            search: true },
        ],
        url: '/wmsshipmentorder/list',
        key: 'id',
        muti: false,
        popover: {
          width: 900,
        },
        autoColumnClose: true,
        tableColumn: 6,
      },
      dialogAllotDetailed: {
        title: '查看',
        row: {},
        size: 'large',
      },
      tableAllotDetailed: {
        column: [
          { label: '明细状态',
            prop: 'show_fymxzt',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '货品名称',
            prop: 'bh',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '货品名称',
            prop: 'mc',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '包装名称',
            prop: 'bzmc',
            minWidth: '0',
            cRemarks: '',
            search: false },
          { label: '主单位数量',
            prop: 'fpsl',
            minWidth: '100px',
            cRemarks: '',
            search: false },
        ],
        option: {
          id: '',
        },
        tableColumn: 5,
        url: '/wmsdistribution/searchDetailed',
        key: 'id',
        muti: false,
      },
      dialogAllotDetailedMx: {
        title: '查看',
        row: {},
        size: 'large',
      },
      tableAllotDetailedMx: {
        column: [
          { label: '货品名称',
            prop: 'bh',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '货品名称',
            prop: 'mc',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '分配数量',
            prop: 'fpsl',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '库位名称',
            prop: 'show_kwid',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '货品批次',
            prop: 'hppc',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '生产日期',
            prop: 'scrq',
            minWidth: '0px',
            type: 'DateRange',
            cRemarks: '',
            formatter: (row, column) => {
              return this.a.methods.formatterTime(row[column.property || column], 6);
            },
            search: true },
          { label: '失效日期',
            prop: 'sxrq',
            minWidth: '0px',
            type: 'DateRange',
            cRemarks: '',
            formatter: (row, column) => {
              return this.a.methods.formatterTime(row[column.property || column], 6);
            },
            search: true },
          { label: '分配序号',
            prop: 'fpxh',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '装箱状态',
            prop: 'show_zxzt',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '拣货人',
            prop: 'jhr',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '拣货时间',
            prop: 'jhsj',
            minWidth: '0px',
            type: 'DateRange',
            cRemarks: '',
            formatter: (row, column) => {
              return this.a.methods.formatterTime(row[column.property || column], 6);
            },
            search: true },
          { label: '集货库位',
            prop: 'show_jhkwid',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '发运状态',
            prop: 'show_fyzt',
            minWidth: '0px',
            cRemarks: '',
            search: false },
        ],
        tableColumn: 5,
        url: '/wmsdistribution/distributionDetailed',
        key: 'id',
        muti: false,
        option: {
          id: '',
        },
      },
      dialogSplitSingleDetailed: {
        title: '查看',
      },
      tableSplitSingleDetailed: {
        column: [
          { label: '货品编号',
            prop: 'bh',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '货品名称',
            prop: 'mc',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '包装名称',
            prop: 'bzmc',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '主单位数量',
            prop: 'yqsl',
            minWidth: '0px',
            cRemarks: '',
            search: false },
        ],
        mitl: false,
        url: '/wmsdistribution/searchDetailed',
        tableColumn: 4,
        option: {
          id: '',
        },
      },
      dialogSplitSingleDetailedMx: {
        title: '查看',
      },
      tableSplitSingleDetailedMx: {
        column: [
          { label: '货品编号',
            prop: 'hpbh',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '货品名称',
            prop: 'hpmc',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '主单位数量',
            prop: 'zdwsl',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '整散标记',
            prop: 'show_zsbj',
            minWidth: '0px',
            cRemarks: '',
            search: false },
          { label: '单位类型',
            prop: 'dwlx',
            minWidth: '0px',
            cRemarks: '',
            search: false },
        ],
        mitl: false,
        url: '/wmsSplit/list/',
        tableColumn: 4,
        option: {
          ssfymxid: '',
        },
      },
    },
    transition: 'slide-fade',
    methods: {
      tableAdditionalShipment (row) {
        let ids = [];
        if (row) {
          ids.push(row.id);
        } else {
          if (this.table.multipleSelection.length < 1) {
            return this.$alert('您还未选择，请您至少选择一个！', '提示');
          }
          this.table.multipleSelection.forEach(item => {
            ids.push(item.id);
          });
        }
        this.$confirm('您将追加发运选择的发运订单', '确认追加发运？', {
          confirmButtonText: '是',
          cancelButtonText: '否',
          type: 'warning',
        })
          .then(async _ => {
            try {
              await this.post('/wmspicking/despacthAdd', {
                ids,
              });
              this.tableWatch('table');
            } catch (err) {
              console.log(err);
            }
          });
      },
      tableAdditionalPacking (row) {
        let ids = [];
        if (row) {
          ids.push(row.id);
        } else {
          if (this.table.multipleSelection.length < 1) {
            return this.$alert('您还未选择，请您至少选择一个！', '提示');
          }
          this.table.multipleSelection.forEach(item => {
            ids.push(item.id);
          });
        }
        this.$confirm('您将追加装箱选择的发运订单', '确认追加装箱？', {
          confirmButtonText: '是',
          cancelButtonText: '否',
          type: 'warning',
        })
          .then(async _ => {
            try {
              await this.post('/wmsbox/againBoxZx', {
                ids,
              });
              this.tableWatch('table');
            } catch (err) {
              console.log(err);
            }
          });
      },
      tableAdditionalAllot (row) {
        let ids = [];
        if (row) {
          ids.push(row.id);
        } else {
          if (this.table.multipleSelection.length < 1) {
            return this.$alert('您还未选择，请您至少选择一个！', '提示');
          }
          this.table.multipleSelection.forEach(item => {
            ids.push(item.id);
          });
        }
        this.$confirm('您将追加分配选择的发运订单', '确认追加分配？', {
          confirmButtonText: '是',
          cancelButtonText: '否',
          type: 'warning',
        })
          .then(async _ => {
            try {
              await this.post('/wmsdistribution/addDistribution', {
                ids,
              });
              this.tableWatch('table');
            } catch (err) {
              console.log(err);
            }
          });
      },
      tableAdditionalPicking (row) {
        let ids = [];
        if (row) {
          ids.push(row.id);
        } else {
          if (this.table.multipleSelection.length < 1) {
            return this.$alert('您还未选择，请您至少选择一个！', '提示');
          }
          this.table.multipleSelection.forEach(item => {
            ids.push(item.id);
          });
        }
        this.$confirm('您将选择的发运订单进行追加拣货操作', '确认追加拣货？', {
          confirmButtonText: '是',
          cancelButtonText: '否',
          type: 'warning',
        })
          .then(async _ => {
            try {
              await this.post('/wmspicking/pickAdd', {
                ids,
              });
              this.tableWatch('table');
            } catch (err) {
              console.log(err);
            }
          });
      },
      dialogAllotDetailedInit () {},
      dialogAllotDetailedOpen (row) {
        try {
          this.tableAllotDetailed.url = '/wmsdistribution/searchDetailed';
          this.tableAllotDetailed.option.id = row.id;
          this.tableWatch('tableAllotDetailed');
          this.dialogAllotDetailed.visible = true;
        } catch (err) {
          console.log(err);
        }
      },
      dialogAllotDetailedMxInit () {},
      dialogAllotDetailedMxOpen (row) {
        try {
          this.tableAllotDetailedMx.url = '/wmsdistribution/distributionDetailed';
          this.tableAllotDetailedMx.option.id = row.id;
          this.tableWatch('tableAllotDetailedMx');
          this.dialogAllotDetailedMx.visible = true;
        } catch (err) {
          console.log(err);
        }
      },
      dialogSplitSingleDetailedOpen (row) {
        if (this.dialogSplitSingleDetailed.title === '查看') {
          this.tableSplitSingleDetailed.option.id = row.id;
          this.tableSplitSingleDetailed.url = '/wmsdistribution/searchDetailed';
          this.tableWatch('tableSplitSingleDetailed');
          this.dialogSplitSingleDetailed.visible = true;
        }
      },
      dialogSplitSingleDetailedMxOpen (row) {
        if (this.dialogSplitSingleDetailedMx.title === '查看') {
          this.tableSplitSingleDetailedMx.option.ssfymxid = row.id;
          this.tableSplitSingleDetailedMx.url = '/wmsSplit/list/';
          this.tableWatch('tableSplitSingleDetailedMx');
          this.dialogSplitSingleDetailedMx.visible = true;
        }
      },
    },
    mounted: function () {
      this.tableWatch('table');
    },
  });
</script>
<style scoped lang="scss">
  .box-card {
    margin: 20px;
  }

  .createTimeSpan {
    display: block;
    margin-top: 34px;
  }

  @media screen and (max-width: 800px) {
    .createTimeSpan {
      margin-top: 0;
    }
    .box-card {
      margin: 0;
    }
  }

  .el-select {
    width: 100%;
  }
</style>

<style lang="scss">
  .oweOrderHandling{
    width: 88vw;
    float: left;
  }
</style>
